package net.huashitong.ssydt.provider.h5.currentpolitics.service;

import net.huashitong.ssydt.provider.h5.currentpolitics.dto.AccessTokenDTO;
import net.huashitong.ssydt.provider.h5.currentpolitics.dto.JsapiTicketDTO;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;

import java.io.IOException;

/**
 * @author <a href="mailto:yhy23456@163.com">huiyang.yu</a>
 * @since 2018.01.25
 */
@CacheConfig
public interface WxService {

    @Cacheable(cacheNames = "getAccessToken")
    AccessTokenDTO getAccessToken(String appid, String secret) throws IOException;

    @Cacheable(cacheNames = "getJsapiTicket")
    JsapiTicketDTO getJsapiTicket() throws IOException;

    String getUrl();

    String getAppId();

    String getBaseUrl();
}
